package www.xfOnline.util;

import java.util.Random;
import java.util.TimerTask;

import www.xfOnline.com.Login;

public class VAR {
	public static int sixNum=0;
	public static String matchAccount="^[0-9]{5,15}$";
	public static String matchEmail="^([a-zA-Z0-9]*[-_]?[a-zA-Z0-9]+)*@([a-zA-Z0-9]*[-_]?[a-zA-Z0-9]+)+[\\.][A-Za-z]{2,3}([\\.][A-Za-z]{2})?$";
	public static String matchPassword="^[a-zA-Z0-9]{6,30}$";
	public static String matchTel="^((13[0-9])|(15[^4,\\D])|(18[0,5-9])|(170))\\d{8}$";
	public static String userName="";
	public static String userEmail="";
	public static long userAccount=0;
	public static int getSixRandom(){
		int[] array = {0,1,2,3,4,5,6,7,8,9};
		Random rand = new Random();
		for (int i = 10; i > 1; i--) {
		    int index = rand.nextInt(i);
		    int tmp = array[index];
		    array[index] = array[i - 1];
		    array[i - 1] = tmp;
		}
		int result = 0;
		for(int i = 0; i < 6; i++)
		    result = result * 10 + array[i];
		return result;
	}
}